<?php
/**
 * Created by PhpStorm.
 * User: chenxuyi
 * Date: 2018/3/3
 * Time: 下午3:00
 */

namespace App\Forms;

use Request;

class BaseForm
{

    private $attributes = [];

    public function __construct()
    {
        $this->attributes = app('request')->all();
    }

    public function __set($name, $value)
    {
        $this->attributes[$name] = $value;
    }

    public function __get($name)
    {
        return isset($this->attributes[$name]) ? $this->attributes[$name] : '';
    }

}